package cn.bopomo.dealer.base.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import cn.bopomo.dealer.base.common.ServiceConfig;
import cn.bopomo.dealer.base.service.IOperatorService;
import cn.bopomo.dealer.base.vo.AuthorizeList;

public class ShowAuthorizeDetailAction extends BaseAction {

	public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {
		// TODO Auto-generated method stub
		String aid = request.getParameter("aid");
		
		if (aid == null){
			//报错
		}
		
		IOperatorService os = (IOperatorService)this.findService(ServiceConfig.OPERATOR_SERVICE);
		AuthorizeList authorize = os.getAuthorize(new Integer(aid));
		
		if (authorize != null ){
			request.setAttribute("authorize",authorize);
		}
		
		return this.findSuccess(mapping);
	}
	
}
